{% extends 'template.html' %}
{% block title_content %}
    靓号列表
{% endblock %}

{% block content %}

    <div class="container">
        <!--按钮-->
        <div style="margin-bottom: 0px" class="left">
            <a class="btn btn-success" href="/pretty/add/">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
                添加靓号
            </a>
            <!--搜索-->
            <a>
                <form class="navbar-form navbar-right" method="get" action="/pretty/list/">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="输入号码" name="q" value="{{ value }}">
                    </div>
                    <button type="submit" class="btn btn-default">搜索</button>
                </form>
            </a>
        </div>
        <br>
        <div class="panel panel-default">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                靓号列表
            </div>
            <!-- Table -->
            <table class="table table-bordered">
                <thead>
                <th>ID</th>
                <th>号码</th>
                <th>价格</th>
                <th>级别</th>
                <th>状态</th>
                <th>操作</th>
                </thead>
                <tbody>
                {% for qurey in qureyset %}
                    <tr>
                        <th>{{ qurey.id }}</th>
                        <td>{{ qurey.mobile }}</td>
                        <td>{{ qurey.price }}</td>
                        <td>{{ qurey.get_level_display }}</td>
                        <td>{{ qurey.get_status_display }}</td>
                        <td>
                            <a class="btn btn-primary btn-xs" href="/pretty/{{ qurey.id }}/edit">编辑</a>
                            <a class="btn btn-danger btn-xs" href="/pretty/delete/?nid={{ qurey.id }}">删除</a>
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
        <!--分页组件-->
        <div class="clearfix">
            <ul class="pagination">
                {{ page_string }}
            </ul>
        </div>
    </div>
{% endblock %}
